<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

    </style>
</head>
<body>
<ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
</ul>
<script src="js/jquery-3.6.0.min.js"></script>
<script>
$(function(){  
    /* var arr=["a","b","c"];
    $(arr).each(function(index,value){
        console.log(value);
    })
    $.each(arr,function(index,value){
        console.log(value);
    }) */
    // $("li").each(function(){
    //     $(this).click(function(){
    //         console.log($(this).text());
    //         console.log(this);
    //     })
    // })
    /* $.each($("li"),function(index,value){
        $(this).click(function(){
            console.log(this);
        })
    }) */
    /* var obj={
        run:function(){
            $("li").each(function(){
                $(this).click(function(){
                    console.log(this);
                })
            })
        }
    }
    obj.run(); */
    var obj={
        arr:["a","b","c"],
        run:function(){
            $.each(this.arr, $.proxy (function(index,value){
                console.log(this.arr);
            },this))
        }
    }
    obj.run();
})
</script>
</body>
</html>